package com.getpebble.android.core.sync;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import com.getpebble.android.common.core.trace.Trace;

public class PblSyncService extends Service {
    private static final String TAG = PblSyncService.class.getSimpleName();
    private PblSyncAdapter mSyncAdapter = null;

    public void onCreate() {
        Trace.debug(TAG, "onCreate()");
        this.mSyncAdapter = new PblSyncAdapter(getApplicationContext(), true);
    }

    public void onDestroy() {
        Trace.debug(TAG, "onDestroy()");
        super.onDestroy();
        this.mSyncAdapter = null;
    }

    public IBinder onBind(Intent intent) {
        Trace.debug(TAG, "onBind()");
        return this.mSyncAdapter.getSyncAdapterBinder();
    }

    public boolean onUnbind(Intent intent) {
        Trace.debug(TAG, "onUnbind()");
        return super.onUnbind(intent);
    }

    public void onRebind(Intent intent) {
        Trace.debug(TAG, "onRebind()");
        super.onRebind(intent);
    }

    public void onTaskRemoved(Intent rootIntent) {
        Trace.debug(TAG, "onTaskRemoved()");
        super.onTaskRemoved(rootIntent);
    }
}
